/**
 * Created by wangyg 
 * on 2017/6/23 15:32
 */
public class test {
	public static int add(int n){
		if(n==1){
			return 1;
		}
		return add(n-1)+n;
	}
	public static void main(String[] args) {
		int add = add(5);
		System.out.println(add);
	}
}